<script setup lang="ts">
import { ref } from "vue";

const url = ref(
  "https://develop-xtang-package.oss-cn-hongkong.aliyuncs.com/6c8c2c1c-5bac-415d-b9f5-85a399787020.jpg"
);

const uploadRef = ref();
const groupId = ref<string>("");
const fileList = ref<any[]>([]);

setTimeout(() => {
  groupId.value = "67d628cb-c65f-4f08-811b-298e7549f389";
}, 1000);

const handleSuccess = (...options) => {
  console.log("======================");
  console.log(options);
};
</script>

<template>
  <div class="!px-[8px]">
    <ul>
      <li>分片上传组件, 文件上传一部分切片，不能预览下载</li>
      <li>删除 loading</li>
      <li>上传一部分，刷新，在上传完成，会多展示一个文件</li>
      <!-- <li>{{ url }}</li> -->
    </ul>
    <p>{{ groupId }}</p>
    <br />
    <p>{{ fileList }}</p>
    <br />
    <!-- <xt-upload
      ref="uploadRef"
      multiple
      accept=".png,.pdf,.zip"
      v-model:groupId="groupId"
      v-model:fileList="fileList"
    >
    </xt-upload> -->

    <br />
    <br />
    <br />
    <!-- <xt-upload-avatar v-model:url="url" /> -->

    <br />
    <br />
    <br />
    <br />
    {{ groupId }}
    <xt-upload-slice
      multiple
      v-model:groupId="groupId"
      v-model:fileList="fileList"
      @success="handleSuccess"
    ></xt-upload-slice>
  </div>
</template>
